import http from '@/util/http.js'

/**
 * 分页查询主题列表
 * @param params
 */
export function getTopicPage(params) {
  return http({
    url: '/kadmin/mqtt/getTopicPage',
    method: 'post',
    data: params
  })
}

/**
 * 新增主题
 * @param params
 * @returns {AxiosPromise}
 */
export function addTopic(params) {
  return http({
    url: '/kadmin/mqtt/addTopic',
    method: 'post',
    data: params
  })
}

/**
 * 更新主题
 * @param params
 * @returns {AxiosPromise}
 */
export function updateTopic(params) {
  return http({
    url: '/kadmin/mqtt/updateTopic',
    method: 'post',
    data: params
  })
}

/**
 * 删除主题
 * @param params
 * @returns {AxiosPromise}
 */
export function deleteTopic(params) {
  return http({
    url: '/kadmin/mqtt/deleteTopic',
    method: 'post',
    data: params
  })
}
